<?php
/**
 * Created by PhpStorm.
 * User: andyge
 * Date: 15/11/8
 * Time: 上午8:54
 */

include_once("../libs/login.php");
include_once("../libs/template.php");

$login = new Login();
$login->check_logined();

$template = new Template();
echo $template->header();

$upload_msg = "";
?>

            <div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <li class="sidebar-search">
                            <div class="input-group custom-search-form">
                                <input type="text" class="form-control" placeholder="Search...">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button">
                                        <i class="fa fa-search"></i>
                                    </button>
                                </span>
                            </div>
                            <!-- /input-group -->
                        </li>
                        <li>
                            <a href="index.php"><i class="fa fa-dashboard fa-fw"></i> 首页</a>
                        </li>
                        <li class="active">
                            <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> 资源<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li class="active">
                                    <a href="#" class="active"> 上传</a>
                                </li>
                                <li>
                                    <a href="res_list.php"> 列表</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-table fa-fw"></i> 主机</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-edit fa-fw"></i> 任务</a>
                        </li>

                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">资源上传</h1>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                <div class="row">
                    <div class="col-lg-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">

                            </div>
                            <div class="panel-body">
                                <div class="col-lg-10 col-lg-offset-1">
                                    <form role="form" action="res_upload_controller.php" method="post" enctype="multipart/form-data">

                                        <div class="form-group">
                                            <label>选择文件</label>
                                            <input type="file" name="file">
                                        </div>
                                        <div class="form-group">
                                            <label>输入标签(多个,分割)</label>
                                            <input class="form-control">

                                        </div>
                                        <button type="submit" class="btn btn-default">确定</button>
                                        <button type="reset" class="btn btn-default">重置</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <?php
                if($upload_msg != "") {
                $msg = <<<TTTS
                <div class="row">
                    <div class="col-lg-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">

                            </div>
                            <div class="panel-body">
                                <div class="col-lg-10 col-lg-offset-1">
                                    ##MSG##
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
TTTS;
                echo $msg;
                }
                ?>

            </div>
            <!-- /.container-fluid -->

        </div>
<?php
echo $template->footer();
?>